#ifndef FBO
#define FBO

#include <iosfwd>
#include <fstream>
#include "../core/os/string.h"
#include "../core/math/vector2d.h"
#include "../core/math/vector3d.h"
#include "../mesh/material.h"
#include "pixel.h"


namespace sleek
{
    namespace texture
    {
        class fbo
        {
            public:
                fbo(core::device::Device*,core::math::vector2di size);
                ~fbo();

                core::math::vector2di getSize();
                GLuint glTexture();

                void enable(bool);
                bool isEnable();

                void start();
                void bind();
                void end();
            protected:
                GLenum status;
                GLuint framebuffer;
                GLuint depthbuffer;
                GLuint texture;
            private:
                bool enabled;
                core::device::Device *dev;
                core::math::vector2di size;
        };
    }
}

#endif
